package fr.sinno.wms.batch.mapper;

import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
import org.springframework.validation.BindException;

import fr.sinno.wms.batch.model.HeaderBonlivraison;


public class HeaderBonLivraisonFieldSetMapper implements FieldSetMapper<Object>  {

	public Object mapFieldSet(FieldSet rs) throws BindException {

		System.out.println("HeaderBonLivraisonFieldSetMapper");
		HeaderBonlivraison headerBL = new HeaderBonlivraison();

		headerBL.setWarehouseCode("");
		headerBL.setSorterCode("");
		headerBL.setStatus("");
		headerBL.setDate(null);
		headerBL.setDoorCode("");
		headerBL.setDriverName("");
		headerBL.setDriverName2("");
		headerBL.setTruck("");
		headerBL.setTruck2("");
		headerBL.setDocument("");
		headerBL.setCarrierCode("");
		headerBL.setSupplierCode("");
		headerBL.setAccountCode("");
		headerBL.setWarehouseCodeTo("");
		headerBL.setTotalNumberContains(0);
		headerBL.setNumberOfLigne(0);

		return headerBL;
	}

}
